<!DOCTYPE HTML><html><head><meta charset="utf-8"><meta name="viewport" content="maximum-scale=1,minimum-scale=1,user-scalable=0,width=device-width,initial-scale=1"><meta name="format-detection" content="telephone=no,email=no,date=no,address=no"><link rel="stylesheet" href="../../../global/css/aui.css"><link rel="stylesheet" href="../../../global/css/my-css.css"><style>html,body{
        background: #fff;
    }</style></head><body><div id="main" class="p-b10 m-l10 p-l5 p-r5 m-r10 p-t10"><div class="p-t10 c-9 s-13" id="mobile-num"></div><div class="p-t10 p-b10" id="mobile-book"></div></div><div id="no-msg" class="aui-hide"><span class="aui-iconfont aui-icon-comment"></span></div></body><script id="tpl-mobile-book" type="text/x-dot-template">{{~it :v:i}}
    <div class="p-t10 p-b10 flex between align-center">
        <div class="flex align-center">
            <div onclick="views.openUCenterWin({{=v.uid}}, &quot;{{=escapeStr(decodeEmoji(v.username))}}&quot;);">
            <img src="{{=v.avatar}}" class="w-50 h-50 r100" />
        </div>
        <div class="m-l10">
            <div class="s-14"> {{=v.address_name}}  <span class="s-11 c-3"></span>
            </div>
            <div class="s-12 c-9">昵称：{{=decodeEmoji(v.username)}} </div>
        </div>
    </div>
         <!-- <button data-uid="{{=v.uid}}" class="no-btn w-65 h-30 l-h25 bg-blue c-f t-c s-13 r4">关注</button>
        <button class="no-btn w-65 h-30 l-h28 b-gray c-9 t-c s-13 r4">已关注</button>
        <button class="no-btn w-65 h-30 l-h28 b-blue c-blue t-c s-13 r4">相互关注</dibuttonv> -->
            <!-- 这里的data-attention-state应该有两种情况 0 3 -->
        <div tapmode onclick="utils.focusPersonOption(this);" data-recommend_source="{{=v.recommend_source}}" data-attention-state="{{=v.attention_state}}" data-uid="{{=v.uid}}" data-from="mobile-book">
            <button class="no-btn w-65 h-30 l-h25 bg-blue c-f t-c s-13 r4">关注</button>
        </div>
    </div>
    {{~}}</script><script id="tpl-mobile-num" type="text/x-dot-template">已有{{=it.num}}位好友加入{{=it.city}}阅同城</script><script src="../../../config.js"></script><script src="../../../global/script/lib/api.js"></script><script src="../../../global/script/lib/doT.min.js"></script><script src="../../../global/script/libx/myRongIM.js"></script><script src="../../../global/script/mylib.js"></script><script src="../../../app.js"></script><script type="text/javascript">apiready = function () {

        window.app.init4Frm();
        window.nowCity = $api.getStorage('city');
        window.start = 0;
        initFocus(window.start, cfg.lauders_one_load);
        addPageLoading();
        loadMore();
        bindRefreshFeed();


    };
    function initFocus(start, size, check) {
        var uid = app.auth.getMyId();
        var gid = app.getGId();
        var data = {
            uid: parseInt(uid),
            gid: parseInt(gid),
            page: start,
            page_context: size
        };

        gateway_user_center('user_address_book', data, {
            always: function(){
                rmPageLoading();
                rmFooterLoading();
                utils.setRefreshDone();
                if(check){
                    $api.byId('mobile-book').innerHTML = '';
                }
            },
            succ: function(json) {
                if (json.data.address_list && json.data.address_list.length < 20) {
                    window.start = -1;
                }
                var html = doT_Render('#tpl-mobile-book', json.data.address_list);
                $api.append($api.byId('mobile-book'), html);

                var mobileNum = {
                    city:window.nowCity,
                    num:json.data.all_count?json.data.all_count:0
                }
                var html = doT_Render('#tpl-mobile-num',mobileNum);
                $api.dom('#mobile-num').innerHTML = html;
            },
            fail: function(err, url) {
                utils.postErrWithTipsEx(err, url, data);
            }
        });
    }

    function fooPushLaud() {
        var html = doT_Render('#tpl-mobile-book', mockLaudList);
        $api.append($api.byId('mobile-book'), html)
        sofast(); // 优化 tapmode
    }

    function loadMore() {
        listenToScrollToBottom(function (ret, err) {
            if (window.start >= 0) {
                window.start++;
                addFooterLoading();
                initFocus(window.start * 20, cfg.lauders_one_load);
            }
        });
    }
    function bindRefreshFeed() {
        utils.bindPullRefresh(function (onDone) {
            window.start = 0;
            initFocus(window.start, cfg.lauders_one_load, 1);
        });
    }</script></html>